import React, { useState } from 'react';
import "./group.scss"
import { Button} from 'antd';
import Lesson from './lesson/Lesson'
import Class from './class/Class'
const Group = () => {
  const [activeTab, setActiveTab] = useState(0);

  const handleTabClick = (index) => {
    setActiveTab(index);
  };

  return (
    <div className="group">
      <div className="tab-content">
        <div
          onClick={() => handleTabClick(0)}
          className={"tab"}
        >
           <Button type="text">团课课程</Button>
        </div>
        <div
          className={"tab"}
          onClick={() => handleTabClick(1)}
        >
          <Button type="text">团课课表</Button>
        </div>
      </div>
      <div className="tab-content1">
        {activeTab === 0 && <Lesson></Lesson>}
        {activeTab === 1 && <Class></Class>}
      </div>
    </div>
  );
}

export default Group;